#!/bin/bash
dir=/tmp/run
#if [ -f $dir ]
#then
#	mv $dir $dir.bak
#	echo "Backup completed!"
#fi
#also write
#/tmp/run里有文件备份
[ -f $dir ] && mv $dir $dir.bak   
echo "Backup completed!"
#if [ -d $dir ]
#then
#	rm -rf $dir/* || mkdir $dir
#	echo "Clean up the complete for /tmp!"
#fi
#also write
#/tmp/run没有
[ -d $dir ] && rm -rf $dir/* || mkdir $dir 
echo "Clean up the complete for /tmp/run!"